<!DOCTYPE html>
<html>
<?php echo $this->fetch('head.html'); ?>
<body>
<div class="body">
 <div class="header" >
    <div  class="left-btn pointer goback"><span class="iconfont icon-back"></span></div>
    <div class="title">夜猫店 信息</div>
     
  </div>
<div class="main-body ">
<div class="row">
 
    <form method='post' id="form" action='<?php echo $this->_var['appymdian']; ?>?m=ymdian&a=save'>
      <input type='hidden' name='ymdianid' value='<?php echo $this->_var['data']['ymdianid']; ?>' >
       
          <table class='table noborder' width='100%'>
                      
            <tr>
              <td>商家名字：</td>
              <td><input type='text' name='title' id='title' class="w98" value='<?php echo $this->_var['data']['title']; ?>' ></td>
            </tr>
            
            <tr><td>楼栋：</td><td> <?php $this->assign("sc",M("site_city")->selectRow("sc_id=".$this->_var["data"]["sc_id"]."")); ?>
            						<?php echo $this->_var['sc']['title']; ?>
  					 
  
  </td></tr>
 
  <tr><td>营业开始：</td><td><input type='text' name='yystart' id='yystart' value='<?php if ($this->_var['data']['yystart']): ?><?php echo $this->_var['data']['yystart']; ?><?php else: ?>18:00<?php endif; ?>' onClick="WdatePicker({dateFmt:'HH:mm'})" ></td></tr>
  <tr><td>营业结束：</td><td><input type='text' name='yyend' id='yyend' value='<?php if ($this->_var['data']['yyend']): ?><?php echo $this->_var['data']['yyend']; ?><?php else: ?>23:59<?php endif; ?>' onClick="WdatePicker({dateFmt:'HH:mm'})"></td></tr>
            
             <tr>
            
              <td>起送价：</td>
              <td>
              <div class="input-row"><label>元</label>
              <input type='text' name='qsjia' id='qsjia' class="w98" value='<?php echo $this->_var['data']['qsjia']; ?>' ></div></td>
            </tr>
            
             <tr>
            
              <td>送货时间：</td>
              <td><div class="input-row"><label>分钟</label><input type='text' name='shsj' id='shsj' class="w98" value='<?php echo $this->_var['data']['shsj']; ?>' ></div></td>
            </tr>
            <tr>
            
              <td>店主：</td>
              <td><input type='text' name='nickname' id='nickname' class="w98" value='<?php echo $this->_var['data']['nickname']; ?>' ></td>
            </tr>
          <tr>
              <td>联系电话：</td>
              <td><input type='text' name='telephone' id='telephone' class="w98" value='<?php echo $this->_var['data']['telephone']; ?>' ></td>
            </tr>
          <tr>
              <td>详细地址：</td>
              <td><input type='text' name='address' id='address' class="w98" value='<?php echo $this->_var['data']['address']; ?>' ></td>
            </tr>   
            
            
     
  <tr>
  	<td>公告:</td>
    <td>
    	<input type="radio" name="ggopen" value="0" <?php if (! $this->_var['data']['ggopen']): ?> checked<?php endif; ?>>关闭
    	<input type="radio" name="ggopen" value="1" <?php if ($this->_var['data']['ggopen']): ?> checked<?php endif; ?>>开启
    </td>
  </tr> 
                  <tr>
  	<td>公告内容:</td>
    <td><input type="text" name="gonggao" value="<?php echo $this->_var['data']['gonggao']; ?>" class="w98"></td>
  </tr>
             
            
           
            <?php if ($this->_var['data']): ?>
            <tr>
              <td>添加时间：</td>
              <td><?php echo date("Y-m-d H:i:s",$this->_var['data']['dateline']); ?></td>
            </tr>
            
            <?php endif; ?>
             
             
            <tr>
              <td>审核状态：</td>
              <td><?php if ($this->_var['data']['status'] == 1): ?>已审核<?php else: ?>未审核<?php endif; ?></td>
            </tr>
            
            
            
             
            
          </table>
     
      <div style="height:50px; line-height:50px;padding-left:100px">
        <button type='button' id="submit" class='btn btn-success'>保存</button>
      </div>
    </form>
  </div>
</div>
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script> 
 
<script>
 
 	
$(document).ready(function(){
	
	$("#submit").on("click",function(){
		$.post("<?php echo $this->_var['appymdian']; ?>?m=ymdian&a=save&ajax=1",$("#form").serialize(),function(data){
			if(data.error){
				skyToast(data.message);
			}else{
				skyToast('保存成功');
			}
		},"json")
	});
	
	
});
</script> 

<?php echo $this->fetch('footer.html'); ?>
</div>
</body>
</html>    

 